package com.define.ssh.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.define.ssh.dao.RoleDao;
import com.define.ssh.model.Role;

@Repository("roleDaoImpl")
public class RoleDaoImpl extends BaseDaoImpl<Role, Long> implements RoleDao {
	/***
	 * 获取除管理员以外的角色
	 * 
	 * @return
	 */
	@Override
	public List<Role> getRoleList() {
		final StringBuffer hql = new StringBuffer(
				"from Role r where r.isvalid=0 and r.id!=1 ");
		return getSession().createQuery(hql.toString()).list();
	}
}
